//
//  StockHeader.swift
//  SlaughterClient
//
//  Created by 邱仙凯 on 2023/4/19.
//  Copyright © 2023 zwb. All rights reserved.
//

import UIKit
 
class ZyaStockHeader: UITableViewHeaderFooterView {
    
    private(set) lazy var titleLab = makeLabel()
    lazy var actionBtn = makeButton()

     override init(reuseIdentifier: String?) {
        super.init(reuseIdentifier: reuseIdentifier)
    
     
        contentView.addSubview(titleLab)
         titleLab.snp.makeConstraints { (make) in
            make.left.equalTo(self.contentView).offset(5)
             make.centerY.equalTo(self.contentView)
        }
         contentView.addSubview(actionBtn)
         actionBtn.snp.makeConstraints { (make) in
             make.left.equalTo(titleLab.snp.right).offset(8)
            make.centerY.equalTo(self.contentView)
            make.width.equalTo(90)
            make.height.equalTo(35)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    private func makeLabel() -> UILabel {
        return UILabel().then {
            $0.font = UIFont.boldSystemFont(ofSize: 16)
            $0.text = "本功能开通VIP会员可见，"
         }
    }
    private func makeButton() -> UIButton {
        return UIButton().then {
            $0.setTitle("立即开通", for: .normal)
            $0.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
            $0.setTitleColor(Theme.ORANGE, for: .normal)
        }
    }
 }
